package org.dromara.bykt.domain.bo;

import org.dromara.bykt.domain.BYKTCourseVideo;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 课程视频业务对象 course_video
 *
 * @author Hou
 * @date 2025-06-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BYKTCourseVideo.class, reverseConvertGenerate = false)
public class BYKTCourseVideoBo extends BaseEntity {

    /**
     * 视频ID
     */
    private Long id;

    /**
     * 课程ID
     */
    @NotNull(message = "课程ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long courseId;

    /**
     * 章节ID
     */
    @NotNull(message = "章节ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long chapterId;

    /**
     * 视频标题
     */
    @NotBlank(message = "视频标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 视频地址
     */
    @NotBlank(message = "视频地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String url;

    /**
     * 视频时长（秒）
     */
    private Long duration;

    /**
     * 排序号
     */
    private Long sort;

    /**
     * 是否免费（0免费 1收费）
     */
    private String isFree;

    /**
     * 观看次数
     */
    private Long viewCount;


}
